
#include <chrono>
#include <tcp_server.h>
#include <thread>

using namespace std::chrono_literals;

int main(int argc, char** argv)
{
    cout << "hello world!" << endl;
    TcpServer server;
    if (server.bind("127.0.0.1", 6666)) {
        cout << "bind successful!" << endl;
    }
    if (server.listen(10)) {
        cout << "listen successful!" << endl;
    }
    // if (server.accept()) {
    //     cout << "connect successful!" << endl;
    // }

    server.start();

    while (true) {
        this_thread::sleep_for(1h);
    }

    return 0;
}